package com.sh.rbac.core.encrypt.properties;

import com.sh.rbac.core.encrypt.enums.AlgorithmType;
import com.sh.rbac.core.encrypt.enums.EncodeType;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 字段加密属性
 *
 * @author wb
 * @since 2025-10-23
 */

@Data
@Component
@ConfigurationProperties(prefix = "encrypt.field")
public class FieldEncryptProperties {

    /**
     * 是否开启字段加密
     */
    private boolean enable = false;

    /**
     * 加密算法
     */
    private AlgorithmType algorithm;

    /**
     * 密钥
     */
    private String secretKey;

    /**
     * 私钥
     */
    private String privateKey;

    /**
     * 公钥
     */
    private String publicKey;

    /**
     * 编码方式
     */
    private EncodeType encode;

}
